<script>
import { logins ,login} from "@/service/index";
export default {
  // onLaunch: function() {
  // 	console.log('App Launch')
  // },
  onShow: function() {
    console.log("App Show");
  },
  onHide: function() {
    console.log("App Hide");
  },
  onLaunch: function() {
    wx.login({
      success: async res => {
        let result = await logins(res.code);
        let res1 = await login({ username: 17687916528, password: 123456 });
        console.log(res1, 121);
        if (res1.status === 200) {
          wx.setStorageSync("token", res1.body.token);
		  wx.setStorageSync("openid", result.data.openid);
        }
        
      }
    });
  }
};
</script>

<style>
/*每个页面公共css */
@import "@/static/iconfont.css";
</style>
